package com.isoft.dao.tabledao;

import com.isoft.entity.tableentity.dfme_hbtt.DfmeHbttDflt;
import com.isoft.entity.tableentity.dfme_hbtt.DfmeHbttMeta;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;

@Mapper
public interface DfmeHbttDao {
    @Insert("insert into TEAM04.COMMON_META( create_time, sndr, rcvr, seqn, ddtm,type, styp) " +
            "values( #{create_time}, #{meta.sndr}, #{meta.rcvr}, #{meta.seqn}," +
            " #{meta.ddtm}, #{meta.type}, #{meta.styp})")
    public int insertMeta(@Param("create_time") Timestamp create_time,
                          @Param("meta") DfmeHbttMeta dfmeHbttMeta);

    @Insert("insert into TEAM04.DFME_HBTT(meta_id,create_time,flid,ffid,fide,hbid,nfln,nawc) " +
            "values(#{meta_id},#{create_time},#{dflt.flid},#{dflt.ffid},#{dflt.fide},#{dflt.hbid},#{dflt.nfln},#{dflt.nawc})")
    public int insertDflt(@Param("meta_id") int meta_id,
                          @Param("create_time") Timestamp create_time,
                          @Param("dflt") DfmeHbttDflt dfmeHbttDflt);
}
